<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Location Preference Report</title>
<?php
	include('Connection.php');
?>
</head>

<body>
<h1>Location Preference Report</h1><br />
<h2>Report for last 3 months</h2><br />

<table width="100%" border="1px" align="center">
    	<tr>
        	<td>Month</td>
            <td>Location</td>
            <td>No of Reservations</td>
            <td>Total No of Hours</td>
        </tr>
        
        <?php
			//query database for all cars
			$query = "";	
					  								
			//$result = mysql_query($query) or die(mysql_error());
										
			for($i = 0; $i < mysql_num_rows($result); $i++){
				
				echo '<tr>';
				
				for ($j = 0; $j < 4; $j++){
					
					if(j == 0)
 						echo '<td>'.$row[Month].'</td>';
						
					else if(j == 1)
 						echo '<td>'.$row[Type].'</td>';
						
					else if(j == 2)
 						echo '<td>'.$row[CarModel].'</td>';
						
					else
 						echo '<td>'.$row[Type].'</td>';		
 				 }
				 
				echo '</tr>';
			}
		?>
    			
        
    </table>
</body>
</html>